﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace NeoFramework.Net
{
    public class Cookie
    {
        public String key = "";
        public String value = "";
        public String expires = "";
        public String domain = "";
        public String path = "";

        public Boolean isEmpty()
        {
            if (key.Length > 0)
            {
                return true;
            }
            else
            {
                return false;
            }
        }

        public Boolean hasExpired()
        {
            DateTime expired = DateTime.Parse(this.expires);
            DateTime now = DateTime.Now;

            if (now.Ticks > expired.Ticks)
            {
                return true;
            }
            else
            {
                return false;
            }
        }
    }
}
